package com.example.service;

import com.example.dao.BranchesDao;
import com.example.entity.Branches;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BranchesService {

    @Autowired
    BranchesDao branchesDao;

    public List<Branches> getAll(){
        return branchesDao.getAll();
    }

    public Branches getOne(int id){
        return branchesDao.getOne(id);
    }

    public int add(Branches branches){
        return branchesDao.add(branches);
    }

    public int delete(int id){
        return branchesDao.delete(id);
    }

    public int update(Branches branches){
        return branchesDao.update(branches);
    }
}
